#pragma once


class AnimatedSpriteController :	public SpriteController
{
public:
	neAnimatedBody*	body;
	void	render(Sprite*	spr);
	void	update(Sprite*	spr);
	~AnimatedSpriteController();
	AnimatedSpriteController(Sprite* spr,neAnimatedBody*	nbody);
};


class PhysicsSpriteController :	public SpriteController
{
public:
	PhysicsSpriteController*	parent;
	neRigidBody*				body;
	std::vector<PhysicsSpriteController*>	children;
	SpriteTrail		trail;
	SpriteOverlay	overlay;
	vec3			framePosition;
	mat3			frameRotation;
	bool			isFalling;
	bool			frameValid;
	int				jumpCountdown;
	int				fireCountdown;
	bool			isBrain;
	float			timeToRecover;
	float			hitpoints;
	float			hadTerrainContact;
	vec3			lastContactPoint;

	
	float stanceWidth;
	float stepRearShift;
	float strideLength;
	float calfCenterHeight;
	float armRearShift;
	float armSwingWidth;
	float armSwingLength;
	float walkSpeed;
	float stepMag;
	float stepHeight;
	float angularDamping;
	float linearDamping;
	float armPhaseShift;





	void	render(Sprite*	spr);
	void	childCollision(neCollisionInfo & collisionInfo);
	void	collision(neCollisionInfo & collisionInfo);
	void	acquirePoint(vec3	pt,float	force,float	maxdist);
	void	standController(float strength);
	void	distressedController(float strength);
	void	invisibleBeatdownController(float strength);
	void	update(Sprite*	spr);
	~PhysicsSpriteController();
	PhysicsSpriteController(neRigidBody*	nbody);
};

